﻿
    function BrandDelete(brandId) {
        $.messager.confirm('删除', '确定要删除该品牌吗?', function (r) {
            if (r) {
                $.ajax({
                    url: "~/Brand/BrandDelete/" + brandId,
                    type: "DELETE",
                    success: function (e) {
                        if (e.Result) {
                            location.reload();
                        } else {
                            $.messager.alert('删除失败', '删除失败!', 'error');
                        }
                    },
                    error: function (e) {
                        alert("error:" + e);
                    }
                });
            }
        });
    }

    function on_page_change(pageNumber, pageSize) {
        $.get("~/Brand/BrandIndex?page=" + pageNumber + "&rows=" + pageSize, function (e) {
            var tp = $(".brand-list");
            var np = $(e);
            tp.children().remove();
            np.find(".brand-list").children().appendTo($(".brand-list"));
        })
    }